#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#include <stdio.h>
#include <sched.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <errno.h>

int main(){
  struct sched_param sp;

  int prio = 1;

  double s,x;
  int i,j;

  sp.sched_priority = prio;
  if (sched_setscheduler(0,SCHED_FIFO,&sp) < 0) {
    perror("sched_setscheduler");
    return EXIT_FAILURE;
  }

  for (j=0 ; j<600 ; j++) {
    s = 0;
    for (i=0 ; i<500000 ; i++) {
      x = sin(3.141592654 * s);
      x = cos(3.141592654 * s);
      x = tan(3.141592654 * s);
      s += 0.1;
    }
  }
  return EXIT_SUCCESS;
}
       
